Add default saved search - #127
Conversation
dutow
left a comment
There was a problem hiding this comment.
Thanks! I added two comments which I think needs some improvement, but otherwise looks good
|
|
||
| def index | ||
| if user_signed_in? && request.format.html? && params[:cursor].blank? && params[:commit].blank? | ||
| default_search = current_user.default_saved_search |
There was a problem hiding this comment.
This makes the default view showing everything very difficult to access, we should have an easy way (button/link) that brings users back to the.
We can also get a ui-issue that since the default search is a saved search, it will show up as a badge at the top, where you can click on the "X" button that redirect to the index, which will redirect back again to the same saved search.
Maybe one solution could be that we make the root "/" URL dependent on this (maybe even make / explicitly redirect to /topics or the saved search), and that way clicking on the hackorum logo always would bring up the user's preferred home page, while clicking on topics will always bring up the entire index?
There was a problem hiding this comment.
clicking on the hackorum logo always would bring up the user's preferred home page, while clicking on topics will always bring up the entire index?
IMO that sounds good
| end | ||
|
|
||
| def set_default | ||
| saved_search = SavedSearch.visible_to(current_user).find(params[:saved_search_id]) |
There was a problem hiding this comment.
either this has to restrict selection to non-team saved searches, or the redirect has to handle adding the team id
There was a problem hiding this comment.
Could you please explain how team saved searches works? I don't understand why this code would need to be changed.
It's my proposition for #121